@extends('admin.layout')
@section('content')
 <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                用户管理
                <small>添加</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 后台主页</a></li>
                <li><a href="#">用户管理</a></li>
                <li class="active">用户添加</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">快速添加用户</h3>
                        </div><!-- /.box-header -->
               
                        <!-- form start -->
                        <form role="form" action="{{ url('/admin/user/insert')}}" method='post'>
                            {{csrf_field()}}
                            <div class="box-body">
                         @if (count($errors) > 0)
                             <div class="alert alert-danger">
                               <ul>
                                 @foreach ($errors->all() as $error)
                                   <li>{{ $error }}</li>
                                 @endforeach
                               </ul>
                             </div>
                         @endif

                                <div class="form-group">
                                    <label for="exampleInputEmail1">用户名</label>
                                    <input type="text" class="form-control" id="username" name="name"
                                           placeholder="请输入6-18位的用户名">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">密码</label>
                                    <input type="password" class="form-control" id="exampleInputPassword1" name="password"
                                           placeholder="请输入6位以上的密码">
                                </div>
                                 <div class="form-group">
                                    <label for="exampleInputPassword1">再次输入密码</label>
                                    <input type="password" class="form-control" id="exampleInputPassword1" name='repassword'
                                           placeholder="请在次输入您的密码">
                                </div>
                                 <div class="form-group">
                                    <label for="exampleInputPassword1">邮箱</label>
                                    <input type="eamil" class="form-control" id="exampleInputPassword1"   name='email'
                                           placeholder="亲输入您的邮箱">
                                </div>
                                 <div class="form-group">
                                    <label for="exampleInputPassword1">联系电话</label>
                                    <input type="text" class="form-control" id="exampleInputPassword1"   name='phone'
                                           placeholder="亲输入您的联系电话">
                                </div>
                                  <div class="form-group">
                                    <label>权限</label>
                                    <select class="form-control" name='auth'>
                                        <option value='0'>普通用户</option>
                                        <option value='1'>管理员</option>
                                    
                                    </select>
                                </div>
                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">用户添加</button>
                            </div>
                        </form>
                    </div><!-- /.box -->

                   
                   
                    <!-- Input addon -->
              
            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
@endsection